package org.jground.rx.def.apps.ipm;
import org.jground.rx.*;
import org.jground.rx.gen.*;
import org.jground.util.*;
import java.util.List;
import org.jground.rx.def.apps.accounting.*;
import org.jground.rx.def.apps.commons.*;
import org.jground.rx.def.apps.knowledge.*;
import org.jground.rx.def.*;
import org.jground.rx.def.apps.crm.*;
import org.jground.rx.def.apps.cip.*;
import org.jground.rx.def.apps.core.*;
import org.jground.rx.def.apps.legal.*;
@SuppressWarnings("unused")
public class Trademark extends GenRoot {

    public static final String moid = "org.jground.rx.def.apps.ipm.Trademark";

    private static final String trademark ="trademark";
    private static final String trademarkType ="trademarkType";
    private static final String trademarkPicture ="trademarkPicture";
    private static final String trademarkClasses ="trademarkClasses";
    private static final String geoRange ="geoRange";
    private static final String tclasses ="tclasses";
    private static final String status ="status";
    private static final String registrationNumber ="registrationNumber";
    private static final String registrationNumberPartCountry ="registrationNumberPartCountry";
    private static final String trademarkNumber ="trademarkNumber";
    private static final String filingDate ="filingDate";
    private static final String registrationDate ="registrationDate";
    private static final String renewal ="renewal";
    private static final String renewalCost ="renewalCost";
    private static final String maxDuration ="maxDuration";
    private static final String decision ="decision";
    private static final String products ="products";
    private static final String keywords ="keywords";
    private static final String documents ="documents";
    private static final String comments ="comments";
    private static final String costsPerActivity ="costsPerActivity";
    private static final String $CREATOR ="$CREATOR";

    public static final class AttName {
        public static final String trademark ="trademark";
        public static final String trademarkType ="trademarkType";
        public static final String trademarkPicture ="trademarkPicture";
        public static final String trademarkClasses ="trademarkClasses";
        public static final String geoRange ="geoRange";
        public static final String tclasses ="tclasses";
        public static final String status ="status";
        public static final String registrationNumber ="registrationNumber";
        public static final String registrationNumberPartCountry ="registrationNumberPartCountry";
        public static final String trademarkNumber ="trademarkNumber";
        public static final String filingDate ="filingDate";
        public static final String registrationDate ="registrationDate";
        public static final String renewal ="renewal";
        public static final String renewalCost ="renewalCost";
        public static final String maxDuration ="maxDuration";
        public static final String decision ="decision";
        public static final String products ="products";
        public static final String keywords ="keywords";
        public static final String documents ="documents";
        public static final String comments ="comments";
        public static final String costsPerActivity ="costsPerActivity";
        public static final String $CREATOR ="$CREATOR";
    }

    public static Trademark createNew() { return new Trademark(RXObjectService.getInstance().create(moid)); }

    public static Trademark getById(String oid) { 
        IRXObject mod = RXObjectService.getInstance().getById(oid);
        if(mod == null) { return null; }
        return new Trademark(mod);
    }

    public static Trademark[] getByIds(String... oids) { 
        List<IRXObject> mods = RXObjectService.getInstance().getByIds(moid, oids);
        Trademark[] res = new Trademark[mods.size()];
        int i = 0;
        for(IRXObject mod : mods) {
            res[i] = new Trademark(mod);
            i++;
        }
        return res;
    }

    public static SearchCriteria newSearchCriteria() {
        return  SearchCriteria.create(moid);
    }

    public static Trademark[] search(SearchCriteria sc) {
        return  wrap(GenRoot._search(sc));
    }

    public static Trademark[] wrap(List<? extends IRXObjectSynopsis> mods) { 
        Trademark[] res = new Trademark[mods.size()];
        int i = 0;
        for(IRXObjectSynopsis mod : mods) {
            res[i] = new Trademark(mod);
            i++;
        }
        return res;
    }

    public static Trademark wrap(IRXObjectSynopsis mod) { 
        return new Trademark(mod);
    }

    private Trademark(IRXObjectSynopsis rxObject) {this.rxObject = (IRXObject) rxObject;}

    public static String getTrademarkLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, trademark).getLabel();
    }

    public static String getTrademarkDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, trademark).getDescription();
    }

    public void setTrademark(String string) {
        rxObject.set(trademark, _to_String(string));
    }

    public String getTrademark() {
        return _to_String(rxObject.getCurrentValue(trademark));
    }

    public static String getTrademarkTypeLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, trademarkType).getLabel();
    }

    public static String getTrademarkTypeDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, trademarkType).getDescription();
    }

    public void setTrademarkType(String codeValue) {
        rxObject.set(trademarkType, _to_String(codeValue));
    }

    public String getTrademarkType() {
        return _to_String(rxObject.getCurrentValue(trademarkType));
    }

    public static String getTrademarkPictureLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, trademarkPicture).getLabel();
    }

    public static String getTrademarkPictureDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, trademarkPicture).getDescription();
    }

    public org.jground.rx.def.apps.commons.Picture getTrademarkPicture() {
        return ArrayUtils.first(org.jground.rx.def.apps.commons.Picture.wrap(rxObject.getComponents(AttName.trademarkPicture)));
    }

    public org.jground.rx.def.apps.commons.Picture createTrademarkPicture() {
        return org.jground.rx.def.apps.commons.Picture.wrap(rxObject.newComponent(trademarkPicture));
    }

    public void setTrademarkPicture(org.jground.rx.def.apps.commons.Picture value) {
        rxObject.set(trademarkPicture, value.getOidString());
    }

    public static String getTrademarkClassesLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, trademarkClasses).getLabel();
    }

    public static String getTrademarkClassesDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, trademarkClasses).getDescription();
    }

    public void addTrademarkClasses(String... string) {
        rxObject.set(trademarkClasses, _to_String(string));
    }

    public void setTrademarkClasses(String[] strings) {
        rxObject.set(trademarkClasses, _to_String(strings));
    }

    public int getTrademarkClassesSize() {
        return StringUtils.rnn(rxObject.getValues(trademarkClasses)).length;
    }

    public String[] getTrademarkClasses() {
        return _to_String(rxObject.getValues(trademarkClasses));
    }

    public String getTrademarkClasses(int index) {
        return _to_String(rxObject.getValues(trademarkClasses))[index];
    }

    public static String getGeoRangeLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, geoRange).getLabel();
    }

    public static String getGeoRangeDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, geoRange).getDescription();
    }

    public void setGeoRange(String codeValue) {
        rxObject.set(geoRange, _to_String(codeValue));
    }

    public String getGeoRange() {
        return _to_String(rxObject.getCurrentValue(geoRange));
    }

    public static String getTclassesLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, tclasses).getLabel();
    }

    public static String getTclassesDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, tclasses).getDescription();
    }

    public int getTclassesSize() {
        return org.jground.rx.def.apps.ipm.TrademarkClass.wrap(rxObject.getComponents(AttName.tclasses)).length;
    }

    public org.jground.rx.def.apps.ipm.TrademarkClass[] getTclasses() {
        return org.jground.rx.def.apps.ipm.TrademarkClass.wrap(rxObject.getComponents(AttName.tclasses));
    }

    public org.jground.rx.def.apps.ipm.TrademarkClass getTclasses(int index) {
        return org.jground.rx.def.apps.ipm.TrademarkClass.wrap(rxObject.getComponents(AttName.tclasses))[index];
    }

    public org.jground.rx.def.apps.ipm.TrademarkClass createTclasses() {
        return org.jground.rx.def.apps.ipm.TrademarkClass.wrap(rxObject.newComponent(tclasses));
    }

    public void setTclasses(org.jground.rx.def.apps.ipm.TrademarkClass[] values) {
        rxObject.set(tclasses, _to_String(tclasses));
    }

    public void addTclasses(org.jground.rx.def.apps.ipm.TrademarkClass value) {
        rxObject.add(tclasses, value.getOidString());
    }

    public static String getStatusLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, status).getLabel();
    }

    public static String getStatusDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, status).getDescription();
    }

    public void setStatus(String codeValue) {
        rxObject.set(status, _to_String(codeValue));
    }

    public String getStatus() {
        return _to_String(rxObject.getCurrentValue(status));
    }

    public static String getRegistrationNumberLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, registrationNumber).getLabel();
    }

    public static String getRegistrationNumberDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, registrationNumber).getDescription();
    }

    public void setRegistrationNumber(String string) {
        rxObject.set(registrationNumber, _to_String(string));
    }

    public String getRegistrationNumber() {
        return _to_String(rxObject.getCurrentValue(registrationNumber));
    }

    public static String getRegistrationNumberPartCountryLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, registrationNumberPartCountry).getLabel();
    }

    public static String getRegistrationNumberPartCountryDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, registrationNumberPartCountry).getDescription();
    }

    public void setRegistrationNumberPartCountry(String string) {
        rxObject.set(registrationNumberPartCountry, _to_String(string));
    }

    public String getRegistrationNumberPartCountry() {
        return _to_String(rxObject.getCurrentValue(registrationNumberPartCountry));
    }

    public static String getTrademarkNumberLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, trademarkNumber).getLabel();
    }

    public static String getTrademarkNumberDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, trademarkNumber).getDescription();
    }

    public static String getFilingDateLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, filingDate).getLabel();
    }

    public static String getFilingDateDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, filingDate).getDescription();
    }

    public void setFilingDate(String dateValue) {
        rxObject.set(filingDate, _to_String(dateValue));
    }

    public String getFilingDate() {
        return _to_String(rxObject.getCurrentValue(filingDate));
    }

    public static String getRegistrationDateLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, registrationDate).getLabel();
    }

    public static String getRegistrationDateDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, registrationDate).getDescription();
    }

    public void setRegistrationDate(String dateValue) {
        rxObject.set(registrationDate, _to_String(dateValue));
    }

    public String getRegistrationDate() {
        return _to_String(rxObject.getCurrentValue(registrationDate));
    }

    public static String getRenewalLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, renewal).getLabel();
    }

    public static String getRenewalDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, renewal).getDescription();
    }

    public void setRenewal(String dateValue) {
        rxObject.set(renewal, _to_String(dateValue));
    }

    public String getRenewal() {
        return _to_String(rxObject.getCurrentValue(renewal));
    }

    public static String getRenewalCostLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, renewalCost).getLabel();
    }

    public static String getRenewalCostDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, renewalCost).getDescription();
    }

    public void setRenewalCost(Currency currency) {
        rxObject.set(renewalCost, _to_String(currency));
    }

    public Currency getRenewalCost() {
        return _to_Currency(rxObject.getValues(renewalCost));
    }

    public static String getMaxDurationLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, maxDuration).getLabel();
    }

    public static String getMaxDurationDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, maxDuration).getDescription();
    }

    public void setMaxDuration(String dateValue) {
        rxObject.set(maxDuration, _to_String(dateValue));
    }

    public String getMaxDuration() {
        return _to_String(rxObject.getCurrentValue(maxDuration));
    }

    public static String getDecisionLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, decision).getLabel();
    }

    public static String getDecisionDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, decision).getDescription();
    }

    public void setDecision(String text) {
        rxObject.set(decision, _to_String(text));
    }

    public String getDecision() {
        return _to_String(rxObject.getCurrentValue(decision));
    }

    public static String getProductsLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, products).getLabel();
    }

    public static String getProductsDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, products).getDescription();
    }

    public void addProducts(org.jground.rx.def.apps.cip.Product... value) {
        rxObject.set(products, _to_String(value));
    }

    public void setProducts(org.jground.rx.def.apps.cip.Product[] values) {
        rxObject.set(products, _to_String(values));
    }

    public int getProductsSize() {
        return StringUtils.rnn(rxObject.getValues(products)).length;
    }

    public org.jground.rx.def.apps.cip.Product[] getProducts() {
        return org.jground.rx.def.apps.cip.Product.getByIds(rxObject.getValues(products));
    }

    public org.jground.rx.def.apps.cip.Product getProducts(int index) {
        return org.jground.rx.def.apps.cip.Product.getByIds(rxObject.getValues(products))[index];
    }

    public static String getKeywordsLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, keywords).getLabel();
    }

    public static String getKeywordsDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, keywords).getDescription();
    }

    public void setKeywords(String text) {
        rxObject.set(keywords, _to_String(text));
    }

    public String getKeywords() {
        return _to_String(rxObject.getCurrentValue(keywords));
    }

    public static String getDocumentsLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, documents).getLabel();
    }

    public static String getDocumentsDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, documents).getDescription();
    }

    public int getDocumentsSize() {
        return org.jground.rx.def.apps.commons.Document.wrap(rxObject.getComponents(AttName.documents)).length;
    }

    public org.jground.rx.def.apps.commons.Document[] getDocuments() {
        return org.jground.rx.def.apps.commons.Document.wrap(rxObject.getComponents(AttName.documents));
    }

    public org.jground.rx.def.apps.commons.Document getDocuments(int index) {
        return org.jground.rx.def.apps.commons.Document.wrap(rxObject.getComponents(AttName.documents))[index];
    }

    public org.jground.rx.def.apps.commons.Document createDocuments() {
        return org.jground.rx.def.apps.commons.Document.wrap(rxObject.newComponent(documents));
    }

    public void setDocuments(org.jground.rx.def.apps.commons.Document[] values) {
        rxObject.set(documents, _to_String(documents));
    }

    public void addDocuments(org.jground.rx.def.apps.commons.Document value) {
        rxObject.add(documents, value.getOidString());
    }

    public static String getCommentsLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, comments).getLabel();
    }

    public static String getCommentsDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, comments).getDescription();
    }

    public void setComments(String text) {
        rxObject.set(comments, _to_String(text));
    }

    public String getComments() {
        return _to_String(rxObject.getCurrentValue(comments));
    }

    public static String getCostsPerActivityLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, costsPerActivity).getLabel();
    }

    public static String getCostsPerActivityDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, costsPerActivity).getDescription();
    }

    public int getCostsPerActivitySize() {
        return org.jground.rx.def.apps.ipm.CostsPerActivity.wrap(rxObject.getComponents(AttName.costsPerActivity)).length;
    }

    public org.jground.rx.def.apps.ipm.CostsPerActivity[] getCostsPerActivity() {
        return org.jground.rx.def.apps.ipm.CostsPerActivity.wrap(rxObject.getComponents(AttName.costsPerActivity));
    }

    public org.jground.rx.def.apps.ipm.CostsPerActivity getCostsPerActivity(int index) {
        return org.jground.rx.def.apps.ipm.CostsPerActivity.wrap(rxObject.getComponents(AttName.costsPerActivity))[index];
    }

    public org.jground.rx.def.apps.ipm.CostsPerActivity createCostsPerActivity() {
        return org.jground.rx.def.apps.ipm.CostsPerActivity.wrap(rxObject.newComponent(costsPerActivity));
    }

    public void setCostsPerActivity(org.jground.rx.def.apps.ipm.CostsPerActivity[] values) {
        rxObject.set(costsPerActivity, _to_String(costsPerActivity));
    }

    public void addCostsPerActivity(org.jground.rx.def.apps.ipm.CostsPerActivity value) {
        rxObject.add(costsPerActivity, value.getOidString());
    }

    public static String get$CREATORLabel() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, $CREATOR).getLabel();
    }

    public static String get$CREATORDescription() {
        return RXSystem.getInstance().getRxService().getRXAttribute(moid, $CREATOR).getDescription();
    }

    public void set$CREATOR(String string) {
        rxObject.set($CREATOR, _to_String(string));
    }

    public String get$CREATOR() {
        return _to_String(rxObject.getCurrentValue($CREATOR));
    }

}
